#include<stdio.h>
#include<time.h>
int main()
{
    //scanf("%d",&h);
    int s[5][5]={};
    int i,a,b;
    for(a=0;a<5;a++){
            for(b=0;b<=a;b++){
                if(b==0){
                    s[a][b]=1;
                }
                else if(a==b){
                    s[a][b]=1;
                }
                else {
                    s[a][b]=s[a-1][b]+s[a-1][b-1];
                }
                printf("%2d  ",s[a][b]);
            }
            printf("\n");

    }
}
